Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Building Databases and Qx Files

Home Register
Log In
By Building Databases and Qx Files
SILVER01HDW
12/22/2015
12:09:33 AM
When appending a database, do your Qx files automatically update as well?

Reply
jeff
12/22/2015
9:37:19 AM
Assuming that Qx means Quick Index file...

The answer is no.

When you run a Build Database Routine (either from Scratch in Modes 1, 3, or 4... or Append in Modes 2 or 5) the software writes records to the pl_profile.txt file on the pointed to or target folder. No other Data Window query-compatible text files are written to.

The only way to make the software write records to a Quick Index file is to run an Export where the specific Quick Index File that you want to update is opened/named as the target file in the dialog box that appears while you are executing the steps that run the Export.


-jp

.

Reply
SILVER01HDW
12/22/2015
4:18:42 PM
Yes sir, Quick Index File indeed.

Yesterday I was running data through the data window to check and create UDM data and I did an add to existing to Qx file and it duplicated some of the results so the numbers were skewed. I'd like to avoid that in future updates if at all possible.

Reply
SILVER01HDW
12/22/2015
10:49:13 PM
OK. I'm getting myself lost -

I'm going to Exports - Quick Index File - Append to Existing Quick Index File - Answering Yes to the question of appending Qx file from next data window query and I pick the Qx file I want to update. I see this at the top of the data window - APPEND TO QUICK INDEX FILE C:\2015\pl_Trainer_clement

Where do I go from here to update the QX file?

Reply
jeff
12/23/2015
11:20:24 AM
Working on a write up that has step by step instructions complete with screenshots.

I'll come back to this thread and post it as soon as I have it done.


-jp

.

Reply
jeff
12/23/2015
2:25:28 PM

--quote:
"OK. I'm getting myself lost -

I'm going to Exports - Quick Index File - Append to Existing Quick Index File - Answering Yes to the question of appending Qx file from next data window query and I pick the Qx file I want to update. I see this at the top of the data window - APPEND TO QUICK INDEX FILE C:\2015\pl_Trainer_clement

Where do I go from here to update the QX file?"
--end quote


my reply:

As soon as you select MENU, EXPORTS, Quick Index File - Append to Existing File:

1. The Data Window will ask whether or not you want to toggle an export 'ON.'

Screenshot:




2. Click YES to continue.

3. A dialog box will appear asking you to select/open the Quick Index File that you want to write to.

Note: This dialog box has text running across the top that says: Select Quick Index File for Append

Note: This dialog box is programmed to only display Data Window compatible text files on the folder you have the Data Window pointed at. For purposes of this discussion, Data Window compatible files are assumed to have file names that begin with the characters "PL_" (without the quotes and not case sensitive) that also have a file extension of ".TXT" (again without the quotes and not case sensitive.) Any file on the pointed to folder fitting that description will be displayed in the dialog box.

Screenshot:




4. Select the Quick Index File that you want to write to and click OPEN.

Note: Alternately you can simply double click the Quick Index file that you want and the dialog will automatically click OPEN for you.

Note: Also alternately, if you are running a Create New Export instead of an Append, you can key a valid file name into the File Name box and click the OPEN button.

WARNING!: Never under any circumstances select your Pl_Profile.txt file as the Quick Index File that you want to write to in this step!

Hint: Think about it. If you select the Pl_Profile.txt file in this step you are telling the Data Window that's the file that you want to write to. The Pl_Profile.txt file is your database file. If you rewrite records to this file you are going to corrupt your database - and your best recovery option is going to be rebuilding that folder from scratch.

5. At this point (after clicking the OPEN button in the above step) the export should be toggled "ON" and you should see text confirming that the Export has been toggled "ON" at the very top of the Data Window on the title stripe.

Note: You know that the Export is toggled ON when you see this or similar text running across the Data Window's title stripe.

Note: At this point you should also see text displayed on the Data Window's main textbox telling you what to do next. (Use the All or UDM button to execute a query.)

Screenshot (with items of importance from the above notes circled ever so crudely with a red mouse pen) here:





6. From here, the next step (under a normal scenario... I'll discuss normal scenarios in a bit) would be to click the ALL or UDM buttons and execute a Data Window query in the normal manner.

Here's how all Data Window Exports work:


  1. Execute a Data Window query with an Export toggled ON - and the Data Window will write each starter returned as part of the query results to the export file. (In this case the quick index file selected in step 4 above.)

  2. Execute a Data Window query without an Export toggled ON - and the Data Window will execute the query in a normal manner - without writing to an export file.



So at this point - under a normal scenario - you would simply click either the ALL or UDM button to execute a query - and make the Data Window write to the selected export or quick index file as it executes the query.

Screenshot showing the dialog box that appears after clicking the UDM button with the Data Window in the background:



Note: Text at the top of the Data Window running across the title stripe reads: "Append to Quick Index File" (without the quotes) followed by the path and name of the quick index file selected in step 4 above. That's the text telling me the Export has been toggled 'ON.'

Note: Look at the Data Window's UDM drop down. Also visible in this screenshot is the name of the UDM I've selected from the drop down that will drive the query results of my export. Hint: The UDM name indicates what the UDM does. It finds starters trained by Cristophe Clement. (This dovetails with the name of the quick index file mentioned in the above note and selected in step 4 above.)

Note: The text at the top of the dialog box in the above screenshot reads "Open a PlayList File" (without the quotes.)

Note: In the above screenshot I've selected the Pl_Profile.txt file by single clicking it and I'm about to finalize the Pl_Profile.txt file as my selection by clicking the OPEN button.

Note: As soon as I click the OPEN button the Data Window is going to open the file just selected in the dialog box (in this case the Pl_Profile.txt file) and read results from that file as it executes the query.

Screenshot showing the Data Window after clicking the OPEN button:



Note: This is what the Data Window looks like while my query is executing. Here the Data Window is finding records flagged by the UDM I executed, tabulating results for those records, and writing those records to the export or quick index file selected in step 4 above.

Screenshot showing the Data Window after my query has executed:



Note: This is what the Data Window looks like after my query has been executed. Here the Data Window is displaying the results set for the UDM I just executed. The Export I just ran is now complete. I can confirm this by running an ALL button query on my quick index file. (When I do that, I can display individual records - I should see the new results.)


That's (almost) it!




Q. What do I mean by a normal scenario?

A. Most of the Data Window Exports (the Quick Index File Exports included) have two options: Create New File and Append to Existing File.

Quick Index File - Create New File Export
The Data Window's Quick Index File - Create New File Export is the simpler of the two options to operate.

It simply creates a new file populated with desired results whenever you execute a query while an export is toggled on.

Important thing to know: If, in step 4 above, you select an existing export or quick index file name in the dialog box, and you are running a Create New Export: The Data Window is going to clear all records from the selected file before it begins adding new records to the file. The result will be an export or quick index file that contains a results set that exactly matches the results set returned by the query run in step 6 above.

Ok. Back to what is meant by a normal scenario for a Create New Export...

Under a normal scenario, where you want your resulting export or quick index file to contain results for the folder where you currently have the Data Window pointed: It's easier if you never run an Append Export.

Under a normal scenario you want your Export to be a Create New.

Why?

Running a Create New instead of an Append is the easiest way to ensure your resulting export or quick index file never contains duplicate records (as mentioned in your post at the very top of this thread.) When you run a Create New instead of an Append the Data Window clears the selected file first and then begins writing records to it. And your resulting export or quick index file ends up containing records that exactly match the results set returned by the query you executed to create it.

Second, running a Create New is also easier than running an Append from an operational standpoint. When you run a Create New you just about never have to think about what's already in an existing file. You can simply select an existing file fully knowing that the Data Window is going to completely overwrite it - and populate it with new records driven by the query (a UDM is the perfect way to control your queries) that you execute.





Quick Index File - Append to Existing File Export
The Data Window's Quick Index File - Append to Existing File Export is one step more complicated - and requires a more in depth understanding of what you are doing.

Important thing to know: If, in step 4 above, you select an existing export or quick index file name in the dialog box, and you are running an Append Export: The Data Window is NOT going to clear all records from the selected file before it begins adding new records to the file. The result will be an export or quick index file that contains 1. All of the records that it previously contained plus 2. New records exactly matching the results set returned by the query run in step 6 above.

Hopefully the file contains desired records.

Hint: UDMs are the perfect way to control the results set written to your export files.

Before adding new records to an existing export or quick index file - you should be acutely aware of what records are already in that file.

You should know the name of the UDM that you used to create the file.

Hint: One easy way to do that is to include the UDM name as part of the quick index file name. Make sure you keep the first 3 characters "PL_" (without the quotes and not case sensiitve) intact. Also make you you keep the file extension ".TXT" (without the quotes and not case sensiitve) too.

In your above post you worked a trainer name into the file name of your quck index file name.

That's perfect if the file contains records generated by executing a trainer name UDM - in this case "trainer name CLEMENT CHRISTOPHE" (without the quotes) through the Data Window in step 6 above.

Again, it's always a good idea to name your export or quick index files in such a way that the file name itself provides you at a glance with a description of the data contained in the file.

You should also know the start and end dates for the records in the file. (That's a tangent subject that will have to be covered in a separate follow up post.)

Ok. Back to what is meant by a normal scenario for an Append Export...

The normal scenario for running an Append Export is when you want your resulting export or quick index file to contain data spanning multiple folders.

FYI, here's a link to an older thread where instructions can be found for doing that:
http://www.jcapper.com/messageboard/TopicReader.asp?topic=710&forum=JCapper%20101

If you do not want your resulting export or quick index file to contain data spanning multiple folders - you are better off running your Exports as Create New instead of Append.



-jp

.




Reply
Reply

Copyright © 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com